Calculation of degree of similarity between two images

ABSTRACT

An image processing apparatus includes: a first circuit which calculates values f(R Pi ), f(G Pi ) and f(B Pi ) by applying a function f(x) to an R grayscale value R R , a G grayscale value G Pi  and a B grayscale value B Pi  of each pixel i of a first image; a second circuit which calculates values f(R Qi ), f(G Qi ) and f(B Qi ) i ) by applying the function f(x) to an R grayscale value R Qi , a G grayscale value G Qi  and a B grayscale value B Qi  of each pixel i of a second image; and a similarity calculation circuit which calculates a degree of similarity between the first and second images depending on |f(R Pi )-f(R Qi )|, |f(G Pi )-|f(G Qi )| and |f(B Pi )-f(B Qi )| associated with each pixel i of the first and second images. The function f(x) is a convex function monotonically non-decreasing in the domain of definition.

CROSS REFERENCE

This application claims priority to Japanese Patent Application No.2016-079745, filed on Apr. 12, 2016, the disclosure of which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to a device and method for imageprocessing, more particularly, to a technique for calculating the degreeof similarity between images (or image data).

BACKGROUND ART

Image comparison is one of the most basic image processing techniques.For example, template matching which calculates the degree of similarity(or likelihood) between a target image and a template image is widelyused in image recognition. Also, image compression of still images orvideo images often includes processing based on the degree of similarity(or degree of difference) between two images.

The degree of similarity between two images (or degree of differencebetween image data of two images) is most typically evaluated with a SAD(sum of absolute differences) or a SSD (sum of squared differences) ofgrayscale values or brightness values. For example, when two images Pand Q are compared on the basis of the brightness value (Y data in theYUV format, for example) of each pixel i of images P and Q, the degreeof similarity S may be calculated by the following expression (1):

$\begin{matrix}{{S = {\sum\limits_{i}\left| {Y_{Pi} - Y_{Qi}} \right|}},} & (1)\end{matrix}$

where Y_(pi) and Y_(Qi) are the brightness values of pixels i of imagesP and Q, respectively, and Σ represents the sum with respect to all thepixels of images P and Q. When the image data of each pixel i is givenin the RGB format, the brightness values Y_(Pi) and Y_(Qi) of pixels iof images P and Q in expression (1) may be calculated in accordance withthe following expressions (2a) and (2b), for example:

Y _(Pi)=0.300R _(Pi)+0.590G _(Pi)+0.110B _(Pi),   (2a)

Y _(Qi)=0.300R _(Qi)+0.590G _(Qi)+0.110B _(Q1),   (2b)

where R_(Pi), G_(Pi) and B_(Pi) are the grayscale values of the red (R),green (G) and blue (B) colors, respectively, which are indicated in theimage data of image P and R_(Qi), G_(Qi) and B_(Qi) are the grayscalevalues of the red, green and blue colors, respectively, which areindicated in the image data of image Q. It should be noted that variousexpressions may be used for conversion from RGB data to Y data as iswell known in the art.

However, the degree of similarity of two images calculated on the basisof the SAD or SSD of the grayscale values of respective colors of therespective pixels or the brightness values of the respective pixels isnot a parameter optimized for representing the difference between twoimages actually displayed on a display device (or the difference betweentwo images actually perceived by an observer observing the displaydevice).

In connection with this, Japanese Patent Application No. H07-231391 Adiscloses a technology in which a compression process selected inresponse to an attribute data is performed in compressing image datadescribed with a page description language.

Japanese Patent Application Publication No. H09-200750 A discloses ablock compression processing based on curved surface fitting, in whichparameters of the curved surface fitting are determined on the basis ofthe sum of squares of compression errors.

Japanese Patent Application No. H05-155072 A discloses a technique whichinvolves compressing a bitmap data received from a host device with aplurality of different compression schemes and selecting the one thatmost reduces the data amount.

SUMMARY OF DISCLOSURE

Therefore, one objective of the present disclosure is to provide atechnique which achieves image processing on the basis of the differencebetween images actually displayed on a display device (or the differencebetween images actually perceived by an observer observing the displaydevice). Other objectives and new features of the present disclosurewould be understood by a person skilled in the art from the followingdescription.

In one embodiment, an image processing apparatus includes: a firstcircuit which calculates values f(R_(Pi)), f(G_(Pi)) and f(B_(Pi)) byapplying a function f(x) to an R grayscale value R_(Pi), a G grayscalevalue G_(Pi) and a B grayscale value B_(Pi) of each pixel i of a firstimage; a second circuit which calculates values f(R_(Qi)), f(G_(Qi)) andf(B_(Qi)) by applying the function f(x) to an R grayscale value R_(Qi),a G grayscale value G_(Qi) and a B grayscale value B_(Qi) of each pixeli of a second image; and a similarity calculation circuit whichcalculates a degree of similarity between the first and second imagesdepending on |f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Q1))| and|f(B_(Pi))-f(B_(Qi))| associated with each pixel i of the first andsecond images. The lower limit of the domain of definition of thefunction f(x) is the allowed minimum value of the R grayscale valuesR_(Pi), R_(Qi), the G grayscale values G_(Pi), G_(Qi) and the Bgrayscale values B_(Pi), B_(Qi), and the upper limit of the same is theallowed maximum value of the R grayscale values R_(Pi), R_(Qi), the Ggrayscale values G_(Pi), G_(Qi) and the B grayscale values B_(Pi),B_(Qi). The function f(x) is a convex function monotonicallynon-decreasing in the domain of definition.

In another embodiment, an image compression circuit includes: acompression circuity generating first to N^(th) compressed data byrespectively performing first to N^(th) compression processes on anoriginal image data, for N being an integer of two or more; adecompression circuitry generating first to N^(th) decompressed data byrespectively performing corresponding decompression processes on thefirst to N^(th) compressed data; first to (N+1)^(th) grayscale dataconversion circuits; and a compressed image data selection circuitselecting an output compressed image data from among the first to N^(th)compressed data and outputting the output compressed image data. Thek^(th) grayscale data conversion circuit of the first to N^(th)grayscale data conversion circuit is configured to calculate valuesf(R_(ki)), f(G_(ki)) and f(B_(ki)) by respectively applying a functionf(x) to an R grayscale value R_(ki), a G grayscale value G_(ki) and a Bgrayscale value B_(ki) of each pixel i of the k^(th) decompressed dataof the first to N^(th) decompressed data, for k being any integer fromone to N. The (N+1)^(th) grayscale data conversion circuit is configuredto calculate values f(R_(INi)), f(G_(INi)) and f(B_(INi)) byrespectively applying the function f(x) to an R grayscale value R_(INi),a G grayscale value G_(INi) and a B grayscale value B_(INi) of eachpixel i of the original image data. The compressed image data selectcircuit is configured to calculate degrees of similarity between theoriginal image data and the first to N^(th) decompressed data and selectan output compressed image data from the first to N^(th) compressed datain response to the calculated degrees of similarity. The degree ofsimilarity between the k^(th) decompressed data and the original imagedata is calculated depending on |f(R_(ki))-f(R_(INi))|,|f(G_(ki))-f(G_(INi))| and |f(B_(ki))-f(B_(INi))| associated with eachpixel i of the k^(th) decompressed data and the original image data. Thelower limit of the domain of definition of the function f(x) is theallowed minimum value of the R grayscale values R_(ki), R_(INi), the Ggrayscale values G_(ki), G_(INi) and the B grayscale values B_(ki),B_(INi), and the upper limit of the same is the allowed maximum value ofthe R grayscale values R_(ki), R_(INi), the G grayscale values G_(k),G_(INi) and the B grayscale values B_(k), B_(INi). The function f(x) isa convex function monotonically non-decreasing in the domain ofdefinition.

The image compression circuit thus configured may be used in a displaydriver which drives a display panel or in a display device.

In still another embodiment, an image processing method includes:calculating values f(R_(Pi)), f(G_(Pi)) and f(B_(Pi)) by applying afunction f(x) to an R grayscale value R_(Pi), a G grayscale value G_(Pi)and a B grayscale value B_(Pi) of each pixel i of a first image;calculating values f(R_(Qi)), f(G_(Qi)) and f(B_(Qi)) by applying thefunction f(x) to an R grayscale value R_(Qi), a G grayscale value G_(Qi)and a B grayscale value B_(Qi) of each pixel i of a second image; andcalculating a degree of similarity between the first and second imagesdepending on |f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| andf(B_(Pi))-f(B_(Qi))| associated with each pixel i of the first andsecond images. The lower limit of the domain of definition of thefunction f(x) is the allowed minimum value of the R grayscale valuesR_(Pi), R_(Qi), the G grayscale values G_(Pi), G_(Qi) and the Bgrayscale values B_(Pi), B_(Qi), and the upper limit of the same is theallowed maximum value of the R grayscale values R_(Pi), R_(Qi) the Ggrayscale values G_(Pi), G_(Qi) and the B grayscale values B_(Pi),B_(Qi). The function f(x) is a convex function monotonicallynon-decreasing in the domain of definition.

The present disclosure provides a technique which achieves imageprocessing on the basis of the difference between images actuallydisplayed on a display device (or the difference between images actuallyperceived by an observer observing the display device).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically illustrates a reference image and images #1 and #2to be compared with;

FIG. 2 is a graph illustrating the relation between the grayscale valueof each color indicated by the image data and the actual brightnesslevel of the corresponding subpixel in a display device;

FIG. 3 is a graph illustrating one example of a polygonal line functionwhich approximates x̂2.2;

FIG. 4A is a diagram schematically illustrating the color gamut ofdisplay panel “A”;

FIG. 4B is a diagram schematically illustrating the color gamut ofdisplay panel “B”;

FIG. 5 is a block diagram illustrating the configuration of an imageprocessing apparatus in one embodiment;

FIG. 6 is a block diagram illustrating the configuration of an imageprocessing apparatus in another embodiment;

FIG. 7 is a block diagram illustrating the configuration of an imageprocessing apparatus in still another embodiment;

FIG. 8 is a block diagram illustrating the configuration of an imagecompression circuit in one embodiment;

FIG. 9A is a block diagram illustrating one example of the configurationof a display device including a display driver incorporating the imagecompression circuit illustrated in FIG. 8;

FIG. 9B is a block diagram illustrating one example of the configurationof a display device including a timing controller incorporating theimage compression circuit illustrated in FIG. 8;

FIG. 10 is a block diagram illustrating the configuration of a motiondetection circuit in one embodiment;

FIG. 11 is a diagram illustrating detection of a motion vector in oneembodiment; and

FIG. 12 is a diagram illustrating the definition of movement directions#1 to #8 and movement amounts #1 to #8 in the present embodiment.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The present disclosure will be now described herein with reference toillustrative embodiments. Those skilled in the art would recognize thatmany alternative embodiments can be accomplished using the teachings ofthe present disclosure. In the following, same or similar elements maybe denoted by same or corresponding reference numerals and suffixes maybe attached to reference numerals to distinguish the same elements fromeach other.

For ease of understanding of a technical idea given in the presentdisclosure, a description is first given of a problem which occurs in atechnique in which the degree of similarity (or degree of difference)between two images is represented with the SAD (sum of absolutedifferences) or SSD (sum of squared differences) of the grayscale valueof each color of each pixel or the brightness value of each pixel.

As described above, the degree of similarity between two images (ordegree of similarity between image data of two images) is most typicallycalculated on the basis of the SAD or SSD of the grayscale value of eachcolor of each pixel or the brightness value of each pixel. When imagedata of a reference image and images #1 and #2 to be compared with aredescribed in the RGB format, for example, the degree of similarity S₁between the reference image and image #1 and the degree of similarity S₂between the reference image and image #2 can be most simply calculatedwith the following expressions (3a) and (3b) based on the SADs:

$\begin{matrix}{{S_{1} = {\sum\limits_{i}\left\{ \left| {R_{1i} - R_{REFi}} \middle| {+ \left| {G_{1i} - G_{REFi}} \middle| {+ \left| {B_{1i} - B_{REFi}} \right|} \right.} \right. \right\}}},} & \left( {3a} \right) \\{{S_{2} = {\sum\limits_{i}\left\{ \left| {R_{2i} - R_{REFi}} \middle| {+ \left| {G_{2i} - G_{REFi}} \middle| {+ \left| {B_{2i} - B_{REFi}} \right|} \right.} \right. \right\}}},} & \left( {3b} \right)\end{matrix}$

where R_(1i), G_(1i) and B_(1i) are respectively the R grayscale value,G grayscale value and B grayscale value (that is, the grayscale valuesof the red, green and blue colors) of pixel i described in the imagedata of image #1 to be compared with, and R_(2i), G_(2i) and B_(2i) arerespectively the R grayscale value, G grayscale value and B grayscalevalue of pixel i described in the image data of image #2 to be comparedwith, while R_(REFi), G_(REFi) and B_(REFi) are respectively the Rgrayscale value, G grayscale value and B grayscale value of pixel idescribed in the image data of the reference image; represents the sumwith respect to all the pixels.

When two images to be compared with each other are actually displayed ona specific display device, the degree of difference between the twoimages actually displayed on the display device or the degree ofdifference between the two images actually perceived by an observer ofthe display device is not properly represented by the sum of absolutedifferences or the sum of squared differences.

Discussed below is one example in which the image data of images #1 and#2 are compared with the image data of the reference image asillustrated in FIG. 1. For simplicity of the discussion, the discussionis given in an assumption that images #1 and #2 and the reference imageeach have four pixels and the R, G and B grayscale values are equal toeach other for each of the four pixels and the R, G and B grayscalevalues of the four pixels are as illustrated in FIG. 1. For example, theR, G and B grayscale values of the left top pixel of the reference imageare defined as 100 in the image data of the reference image.

With respect to images #1, #2 and the reference image illustrated inFIG. 1, when the degree of similarity S₁ between image #1 and thereference image and the degree of similarity S₂ between image #2 and thereference image are calculated in accordance with expressions (3a) and(3b), the degrees of similarity S₁ and S₂ are obtained as follows:

S₁=|100−99|+|100−99|+|100−99|+|50−50|+|50−50|+|50−50|+|50−50|+|50−50|+|50−50|+|100−100|+|100−100|+|100−100|=3,and

S₂=|100−100|+|100−100|+|100−100|+|50−49|+|50−49|+|50−49|+|50−50|+|50−50|+|50−50|+|100−100|+|100−100|+|100−100|=3.

This means that the degrees of similarity S₁ and S₂ calculated inaccordance with expressions (3a) and (3b) are equal to each other.

When images #1, #2 and the reference images are actually displayed on adisplay device, however, an observer of the display device perceivesthat the difference between image #1 and the reference image is largerthan that between image #2 and the reference image. This implies thatthe degree of similarity (or degree of difference) calculated on thebasis of the SAD of the grayscale value of each color of each pixel doesnot perfectly reflect the degree of similarity (or degree of difference)perceived by the observer of the display device. This discussion alsoapplies to the case when the degree of similarity is calculated on theSSD of the grayscale value of each color of each pixel and the case whenthe degree of similarity is calculated on the SAD or SSD of thebrightness value (Y data) of each pixel.

One cause of this phenomenon is that the input-output property of thedisplay device (which may be referred to as the gamma characteristics ingeneral) is ignored in the scheme of evaluating the degree of similarityon the basis of the SAD or SSD of the grayscale value of each color ofeach pixel or the brightness value of each pixel.

FIG. 2 is a graph illustrating one example of the input-output propertyof a display device. In general, the input-output property of a displaydevice is non-linear. Most typically, when a grayscale value of aspecific color (for example, the red, green or blue color) of a specificpixel is described in an input image data, the brightness level of thesubpixel of the specific color of the specific pixel is proportional tothe γ^(th) power of the grayscale value in the display screen of thedisplay device, where γ is a parameter called “gamma value”; the gammavalue γ is usually set to 2.2 for a panel display device such as aliquid crystal display device and an OLED (organic light emitting diode)display device.

Due to the non-linear input-output property of a display device, evenwhen the SADs or SSDs of the grayscale value of each color of each pixeldescribed in image data are same, the difference in the actualbrightness level between subpixels for which the grayscale valuesdescribed in the image data are in a relatively large range is largerthan that between subpixels for which the grayscale values described inthe image data are in a relatively small range. In the exampleillustrated in FIG. 1, the grayscale values of the correspondingsubpixels of the upper left pixels of image #1 and the reference imageare in the range near 100, while the grayscale values of thecorresponding subpixels of the upper right pixels of image #2 and thereference image are in the range near 50. In this case, the differenceof “1” in the grayscale value in the range near 100 between image #1 andthe reference image causes a larger influence on the brightness levelsof the pixels actually displayed on the display device, than thedifference of “1” in the grayscale value in the range near 50 betweenimage #2 and the reference image. The scheme of evaluating the degree ofsimilarity (or degree of difference) on the basis of the SAD or SSD ofthe grayscale value of each color of each pixel or the brightness valueof each pixel cannot properly evaluate such difference in the brightnesslevel. In embodiments described in the following, a technique ispresented which allows appropriately calculating the degree ofsimilarity (or degree of difference) in view of the non-linearinput-output property of a display device.

In one embodiment, when image data of two images P and Q are given inthe RGB format, the degree of similarity S between images P and Q (orthe degree of similarity S between image data of the two images P and Q)is calculated in accordance with the following expression (4):

$\begin{matrix}{{S = {\sum\limits_{i}{\left( {\left| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \right|,\left| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \right|,\left| {{f\left( B_{Pi} \right)} - {f\left( B_{QI} \right)}} \right|} \right)}}},} & (4)\end{matrix}$

where R_(Pi), G_(Pi) and B_(Pi) are respectively the R grayscale value,G grayscale value and B grayscale value of pixel i described in theimage data of image P, and where R_(Qi), G_(Qi) and B_(Qi) arerespectively the R grayscale value, G grayscale value and B grayscalevalue of pixel i described in the image data of image Q. Note that Σrepresents the sum with respect to all the pixels of images P and Q.

In the following description, the R, G and B grayscale values arerepresented with integers equal to or more than zero in the image dataof images P and Q. It should be noted that R, G and B grayscale valuescan be represented with integers equal to or more than zero without lossof generality, because R, G and B grayscale values are generallyrepresented in the binary notation in handing image data in processorsor other semiconductor devices.

In expression (4), f(x) is a convex function monotonicallynon-decreasing in the domain of definition, where the lower limit of thedomain of definition is the allowed minimum value of the grayscalevalues (R, G and B grayscale values) of the respective pixels in theimage data and the upper limit of the domain of definition is theallowed maximum value of the grayscale values. The convex function maybe also referred to as the downward-convex function. When the R, G and Bgrayscale values are each represented with eight bits in an image data,the allowed minimum value of the R, G and B grayscale values is zero andthe allowed maximum value is 255. In this case, the lower limit of thedomain of definition of the function f(x) is zero and the upper limit ofthe same is 255. The function f(x) may be a convex functionmonotonically increasing in the domain of definition.

It should be noted that the function f(x) is a non-linear function,since the function f(x) is a convex function (or downward-convexfunction). It should be also noted that the function f(x) is not aconstant function, since the function f(x) is a monotonicallynon-decreasing convex function.

Furthermore, the function g(x, y, z) is a function which depends on allof x, y and z, and is not a constant function. In other words,expressions (4), which calculates the degree of similarity S with thefunction g(x, y, z), means that the degree of similarity S betweenimages P and Q is calculated depending on three absolute differences|f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and |f(B_(Pi))-f(B_(Qi))|.The degree of similarity S between images P and Q calculated inaccordance with expression (4) is more appropriate in view of thenon-linear input-output property of the display device, compared withthe degree of similarity calculated depending on the absolutedifferences of the R, G and B grayscale values |R_(Pi)-R_(Qi)|,|G_(Pi)-G_(Qi)| and |B_(Pi)-B_(Qi)|.

In an actual implementation, the calculations of the functions f(x) andg(x, y, z) may be achieved with any technical means. For example, thecalculations of the functions f(x) and g(x, y, z) may be implementedwith a hardware circuit dedicated for the calculations of the functionsf(x) and g(x, y, z), or implemented with lookup tables. Alternatively,the calculations of the functions f(x) and g(x, y, z) may be implementedwith software.

In a preferred embodiment, the degree of similarity S of images P and Qmay be calculated in accordance with the following expression (5):

$\begin{matrix}{{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {}_{P}{+ K_{G}} \middle| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {}_{P}{+ K_{B}} \middle| {{f\left( B_{Pi} \right)} - {f\left( B_{QI} \right)}} \right|^{P} \right\}}},} & (5)\end{matrix}$

where p is a non-zero number and K_(R), K_(G) and K_(B) are weightingfactors defined for the red, green and blue colors, respectively, in thecalculation of the degree of similarity S. It should be noted that, in aterminology “calculate in accordance with a certain expression”, theterm “in accordance with” means to include not only the calculationusing the certain expression itself but also a calculation using anexpression equivalent to the certain expression. For example, anexpression obtained from a specific expression simply through amathematical deformation is equivalent to the specific expression. Whenthe weighting factors K_(R), K_(G) and K_(B) are positive numbers,expression (5) can be rewritten as

$\begin{matrix}{S = {\sum\limits_{i}\left\{ \left| {{K_{R} \cdot {f\left( R_{Pi} \right)}} - {K_{R} \cdot {f\left( R_{Qi} \right)}}} \middle| {}_{P}{+ \left| {{K_{G} \cdot {f\left( G_{Pi} \right)}} - {K_{G} \cdot {f\left( G_{Qi} \right)}}} \middle| {}_{P}{+ \left| {{K_{B} \cdot {f\left( B_{Pi} \right)}} - {K_{B} \cdot {f\left( B_{QI} \right)}}} \right|^{P}} \right.} \right. \right\}}} & \left( 5^{\prime} \right)\end{matrix}$

In this case, it would be easily understood by a person skilled in theart that expressions (5) and (5′) are mathematically equivalent.

The weighting factors K_(R), K_(G) and K_(B) may be one. In this case,expression (5) may be rewritten as follows:

$\begin{matrix}{S = {\sum\limits_{i}\left\{ \left| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {}_{P}{+ \left| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {}_{P}{+ \left| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right|^{P}} \right.} \right. \right\}}} & (6)\end{matrix}$

In view of easiness of the calculation of the degree of similarity S, itis preferable that p=1. In other words, it is preferable that the degreeof similarity S is calculated in accordance with the followingexpression (7):

$\begin{matrix}{{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right| \right\}}},} & (7)\end{matrix}$

As described above, a display device typically has an input-outputproperty in which the brightness level of the subpixel of a specificcolor of a specific pixel in the display screen of a display device isproportional to the γ^(th) power of the grayscale value of the specificcolor of the specific pixel indicated in the image data, where γ is thegamma value of the display device. In this aspect, it is preferable thatthe function f(x) is defined as a function which depends on a constantpower of x. For example, it is preferable that the function f(x) isdefines as follows:

f(x)=x̂a,

where the operator “̂” represents a power operator and a is a constantmore than one.

Especially, when the gamma value of the display device is γ, it ispreferable that the function f(x) used to calculate the degree ofsimilarity between images associated with image data used in the displaydevice is a function that depends on the γ^(th) power of x, for γ≠1. Forexample, it is preferable that the degree of similarity S between imagesP and Q is calculated in accordance with the following expression (8):

$\begin{matrix}{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{Pi}^{\gamma} - R_{Qi}^{\gamma}} \middle| {+ K_{G}} \middle| {G_{Pi}^{\gamma} - G_{Qi}^{\gamma}} \middle| {+ K_{B}} \middle| {B_{Pi}^{\gamma} - B_{Qi}^{\gamma}} \right| \right\}}} & (8)\end{matrix}$

It should be noted that expression (8) can be obtained by defining thefunction f(x) as follows in expression (7):

f(x)=x̂γ.

Since the gamma value γ is generally set to 2.2 in a display device(e.g., a liquid crystal display device and OLED display device), it ispreferable that the degree of similarity S between images P and Q iscalculated in accordance with the following expression (9):

$\begin{matrix}{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{Pi}^{2.2} - R_{Qi}^{2.2}} \middle| {+ K_{G}} \middle| {G_{Pi}^{2.2} - G_{Qi}^{2.2}} \middle| {+ K_{B}} \middle| {B_{Pi}^{2.2} - B_{Qi}^{2.2}} \right| \right\}}} & (9)\end{matrix}$

As described above, defining the function f(x) as a function dependingon a constant power of x, for example as in the case when the degree ofsimilarity S is calculated in accordance with expression (8) or (9), ispreferable for evaluating the degree of difference between two imagesactually displayed on a display device from the image data associatedwith the two images; however, defining the function f(x) as a functiondepending on a constant power of x may cause a problem of an undesiredincrease in the circuit size in an implementation in an actual device,because the circuit size of a hardware circuit which strictly performs apower operation is large.

To address this problem, it is preferable to define the function f(x) asa polygonal line function or polynomial function which approximates aconstant power of x. The polygonal line function referred to herein is acontinuous function the graph of which consists of line segments. FIG. 3illustrates one example of f(x) defined as a polygonal line functionwhich approximates a constant power of x. Illustrated in the example ofFIG. 3 is the function f(x) which is defined a continuous function thegraph of which consists of three line segments. Since the size of ahardware circuit which calculates a polygonal line function orpolynomial function can be significantly reduced compared with that of ahardware circuit which strictly calculates a power function, definingthe function f(x) as a polygonal line function or polynomial functionwhich approximates a constant power of x is effective for reducing thecircuit size.

Especially, when the gamma value of the display device is γ, it ispreferable to define the function f(x) as a polygonal line function orpolynomial function which approximates x̂γ. For example, when the gammavalue of the display device is 2.2, it is preferable to define thefunction f(x) as a polygonal line function or polynomial function whichapproximates x̂2.2.

The weighting factors K_(R), K_(G) and K_(B) used in expressions (5) to(10) are respectively used to adjust the influences of the grayscalevalues of the red, green and blue colors on the degree of similarity S.In one embodiment, the weighting factors K_(R), K_(G) and K_(B) may beset on the basis of the characteristics of the display device, forexample, the color gamut of the display panel included in the displaydevice. This allows calculating the degree of similarity S which morereflects the degree of difference between images actually displayed onthe display device.

Discussed below is one example in which display devices respectivelyinclude display panels “A” and “B” which have the color gamutillustrated in FIGS. 4A and 4B, respectively. As understood from FIGS.4A and 4B, the color gamut of display panel “B” is wider in the green(G) region, compared with display panel “A”. In this case, thedisplayable brightness level of green of display panel “B” is higherthan that of display panel “A”. Accordingly, it is preferable toincrease the weighting factor K_(G) when the degree of similarity S iscalculated with respect to the display device including display panel“B”, compared with the case when the degree of similarity S iscalculated with respect to the display device including display panel“A”. The same discussion applies to other colors (the red and bluecolors).

The above-described calculation of the degree of similarity S betweentwo images may be implemented with a hardware circuit. FIG. 5 is a blockdiagram illustrating one example of the configuration of an imageprocessing apparatus 10 which calculates the degree of similarity Sbetween images P and Q with a hardware circuit.

The image processing apparatus 10 is configured to calculate the degreeof similarity S between images P and Q which are given in the RGBformat. In FIG. 5, image data of pixel i of image P is denoted by thelegend “D_(Pi)” and image data of pixel i of image Q is denoted by thelegend “D_(Qi)”. The image data D_(Pi) of pixel i of image P includes anR grayscale value R_(Pi), a G grayscale value G_(Pi) and a B grayscalevalue B_(p1). Correspondingly, the image data D_(Qi) of pixel i of imageQ includes an R grayscale value R_(Qi), a G grayscale value G_(Qi) and aB grayscale value B_(Qi).

The image processing apparatus 10 includes RGB grayscale data conversioncircuits 11, 12, a similarity calculation circuit 13 and settingregisters 14 and 15. The RGB grayscale data conversion circuit 11includes an R conversion block 11R, a G conversion block 11G and a Bconversion block 11B. The RGB grayscale data conversion circuit 11 issequentially supplied with image data D_(Pi) of respective pixels i ofimage P. The R conversion block 11R of the RGB grayscale data conversioncircuit 11 includes a circuit which calculates the value f(R_(Pi)) byapplying the above-described function f(x) to the R grayscale valueR_(Pi) of the image data D_(Pi) of each pixel i of image P. Similarly,the G conversion block 11G includes a circuit which calculates the valuef(G_(Pi)) by applying the above-described function f(x) to the Ggrayscale value G_(Pi) of the image data D_(Pi) of each pixel i of imageP and the B conversion block 11B includes a circuit which calculates thevalue f(B_(Pi)) by applying the above-described function f(x) to the Bgrayscale value B_(Pi) of the image data D_(Pi) of each pixel i of imageP.

Similarly, the RGB grayscale data conversion circuit 12 includes an Rconversion block 12R, a G conversion block 12G and a B conversion block12B. The RGB grayscale data conversion circuit 12 is sequentiallysupplied with image data D_(Qi) of respective pixels i of image Q. The Rconversion block 12R of the RGB grayscale data conversion circuit 12includes a circuit which calculates the value f(R_(Qi)) by applying theabove-described function f(x) to the R grayscale value R_(Qi) of theimage data D_(Qi) of each pixel i of image Q. Similarly, the Gconversion block 12G includes a circuit which calculates the valuef(G_(Qi)) by applying the above-described function f(x) to the Ggrayscale value G_(Qi) of the image data D_(Q) of each pixel i of imageQ and the B conversion block 12B includes a circuit which calculates thevalue f(B_(Qi)) by applying the above-described function f(x) to the Bgrayscale value B_(Qi) of the image data D_(Qi) of each pixel i of imageQ.

The similarity calculation circuit 13 calculates the degree ofsimilarity S in accordance with a selected one of expressions (4) to (9)on the basis of the values f(R_(Pi)), f(G_(Pi)) and f(B_(Pi)) receivedfrom the RGB grayscale data conversion circuit 11 and the valuesf(R_(Qi)), f(G_(Qi)) and f(B_(Qi)) received from the RGB grayscale dataconversion circuit 12, and outputs a data indicating the degree ofsimilarity S.

The setting register 14 stores therein setting parameters specifyingcoefficients and/or constants included in the function f(x) used in theRGB grayscale data conversion circuits 11 and 12. It is possible tomodify the function f(x) through modifying the setting parameters storedin the setting register 14. For example, when the function f(x) isdefined with the following expression:

f(x)=x̂γ,

a parameter specifying the value of γ may be stored in the settingregister 14. When the function f(x) is a polygonal line function,setting parameters specifying coefficients of expressions which definethe respective line segments that form the graph of the polygonal linefunction may be stored in the setting registers 14. When the functionf(x) is represented as a polynomial expression of x, setting parametersspecifying coefficients of respective terms of the polynomial expressionmay be stored in the setting registers 14.

The setting register 15 stores therein setting parameters specifyingcoefficients and/or constants included in the function g(x, y, z). It ispossible to modify the function g(x, y, z) through modifying the settingparameters stored in the setting register 15. When the degree ofsimilarity S is calculated in accordance with a selected one ofexpressions (5), (7), (8) and (9), for example, the setting register 15may store therein the weighting factors K_(R), K_(G) and K_(B). In thiscase, the degree of similarity S is calculated by using the weightingfactors K_(R), K_(G) and K_(B) stored in the setting register 15.

When the image data of images P and Q are given in a format differentthan the RGB format, the image data of images P and Q may be convertedinto image data in the RGB format and the degree of similarity S may becalculated from the image data in the RGB format obtained by thisconversion. FIG. 6 is a block diagram illustrating an example of theconfiguration of an image processing apparatus 10A thus configured.

The image processing apparatus 10A illustrated in FIG. 6, which isconfigured similarly to the image processing apparatus 10 illustrated inFIG. 5, additionally includes image data conversion circuits 16 and 17.The image data conversion circuit 16 receives an image data D_(Pi)̂ ofimage P described in a format different than the RGB format, andgenerates the image data D_(Pi) of the RGB format for each pixel i ofimage P. Similarly, the image data conversion circuit 17 receives animage data D_(Q)̂ of image Q described in a format different than theRGB format, and generates the image data D_(Qi) of the RGB format foreach pixel i of image Q. The operations of the RGB grayscale dataconversion circuits 11, 12 and the similarity calculation circuit 13 areas described above. The similarity calculation circuit 13 outputs a dataindicating the degree of similarity S between images P and Q.

The calculation of the degree of similarity S between images P and Q maybe implemented with software. FIG. 7 is a block diagram schematicallyillustrating one example of the configuration of an image processingapparatus 20 which is configured to calculate the degree of similarity Sbetween images P and Q with software. The image processing apparatus 20,which is configured as a computer, includes a processor 21 (e.g. CPU(central processing unit)), a main memory device 22, an input device 23,a display device 24, an auxiliary memory device 25. The auxiliary memorydevice 25 stores therein image processing software 26 and data files 27.The image processing software 26 includes program codes used for imageprocessing in the image processing apparatus 20, including theabove-described calculation of the degree of similarity S between imageP and Q; the above-described calculation of the degree of similarity Sbetween image P and Q is achieved by executing the image processingsoftware 26 with the processor 21. Stored in the data files 27 are imagedata to be subjected to the image processing in the image processingapparatus 20 (e.g. image data of images P and Q), data used in the imageprocessing, and data obtained as the result of the image processing.Installation of the image processing software 26 into the imageprocessing apparatus 20 may be achieved by using a non-transitoryrecording medium 28 storing the image processing software 26, forexample.

In one embodiment, image data of images P and Q are stored in a datafile 27, and the image processing software 26 calculates the degree ofsimilarity S between images P and Q by performing the above-describedprocessing on the image data of images P and Q. When the image data ofimages P and Q are given in a format different than the RGB format,processing to convert the image data into the RGB format may beperformed and followed by calculating the degree of similarity S fromthe image data obtained by this conversion.

The above-described calculation scheme of the degree of similaritybetween images in this embodiment may be used in various imageprocessing techniques. For example, the above-described calculationscheme may be used for selecting a suitable one from a plurality ofcompression processes. FIG. 8 is a block diagram illustrating oneexample of the configuration of an image compression circuit 30configured to perform such operation.

The image compression circuit 30 illustrated in FIG. 8 is configured toperform a compression process on an image data D_(IN) in the RGB formatand output an output compressed image data D_(OUT). The imagecompression circuit 30 includes compression blocks 31 ₁ to 31 ₃,decompression blocks 32 ₁ to 32 ₃, RGB grayscale data conversioncircuits 33 ₁ to 33 ₃, 34 and a compressed image data selection circuit35.

The compression blocks 31 ₁ to 31 ₃ form a compression circuitry whichgenerates compressed data #1 to #3 by performing first to thirdcompression processes on the image data D_(IN), respectively. Morespecifically, the compression block 31 ₁ performs a first compressionprocess (compression process #1) on the image data D_(IN) to generatecompressed data #1. Similarly, the compression block 31 ₂ performs asecond compression process (compression process #2) on the image dataD_(IN) to generate compressed data #2 and the compression block 31 ₃performs a third compression process (compression process #3) on theimage data D_(IN) to generate compressed data #3.

The decompression blocks 32 ₁ to 32 ₃ form a decompression circuitrywhich performs corresponding decompression processes on the compresseddata #1 to #3 to generate decompressed data #1 to #3. More specifically,the decompression block 32 ₁ performs the decompression processcorresponding to compression process #1 (decompression process #1) oncompressed data #1 to generate decompressed data #1. The decompresseddata #1 obtained through decompressed process #1 is in the RGB format,as is the case with the image data D_(IN). Similarly, the decompressionblock 32 ₂ performs the decompression process corresponding tocompression process #2 (decompression process #2) on compressed data #2to generate decompressed data #2, and the decompression block 32 ₃performs the decompression process corresponding to compression process#3 (decompression process #3) on compressed data #3 to generatedecompressed data #3. Decompressed data #2 and #3 obtained throughdecompression processes #2 and #3 are in the RGB format, as is the casewith the image data D_(IN).

The RGB grayscale data conversion circuits 33 ₁ to 33 ₃ are configuredsimilarly to the above-described RGB grayscale data conversion circuits11 and 12 (see FIG. 5), and have a similar function. The RGB grayscaledata conversion circuit 33 ₁ calculates values f(R_(1i)), f(G_(1i)) andf(B_(1i)) by respectively applying the function f(x) to the R grayscalevalue R_(1i), the G grayscale value G_(1i) and the B grayscale valueB_(1i) of each pixel i of decompressed data #1. Similarly, the RGBgrayscale data conversion circuit 33 ₂ calculates values f(R_(2i)),f(G_(2i)) and f(B_(2i)) by respectively applying the function f(x) tothe R grayscale value R_(2i), the G grayscale value G_(2i) and the Bgrayscale value B_(2i) of each pixel i of decompressed data #2.Furthermore, the RGB grayscale data conversion circuit 33 ₃ calculatesvalues f(R_(3i)), f(G_(3i)) and f(B_(3i)) by respectively applying thefunction f(x) to the R grayscale value R_(3i), the G grayscale valueG_(3i) and the B grayscale value B_(3i) of each pixel i of decompresseddata #3.

The RGB grayscale data conversion circuits 34 is also configuredsimilarly to the above-described RGB grayscale data conversion circuits11 and 12, and has a similar function. The RGB grayscale data conversioncircuits 34 calculates values f(R_(INi)), f(G_(INi)m) and f(B_(INi)) byrespectively applying the function f(x) to the R grayscale valueR_(INi), the G grayscale value G_(INi) and the B grayscale value B_(INi)of each pixel i of the original image data D_(IN).

The compressed image data selection circuit 35 calculates the degree ofsimilarity S₁ between decompressed data #1 and the original image dataD_(IN), the degree of similarity S₂ between decompressed data #2 and theoriginal image data D_(IN) and the degree of similarity S₃ betweendecompressed data #3 and the original image data D_(IN) and outputs aselected one of compressed data #1 to #3 as an output compressed imagedata D_(OUT), on the basis of the degrees of similarity S₁ to S₃.

More specifically, in one embodiment, the degree of similarity S₁between decompressed data #1 and the original image data D_(IN) iscalculated by applying a selected one of expressions (4) to (9) todecompressed data #1 and the original image data D_(IN) as the imagedata of images P and Q, respectively. Similarly, the degree ofsimilarity S₂ between decompressed data #2 and the original image dataD_(IN) is calculated by applying the selected one of expressions (4) to(9) to decompressed data #2 and the original image data D_(IN) as theimage data of images P and Q, respectively. Also, the degree ofsimilarity S₃ between decompressed data #3 and the original image dataD_(IN) is calculated by applying the selected one of expressions (4) to(9) to decompressed data #3 and the original image data D_(IN) as theimage data of images P and Q, respectively.

In other words, the degree of similarity S_(k) between decompressed data#k and the original image data D_(IN) may be calculated in accordancewith a selected one of the following expressions (10) to (15) for kbeing an integer from one to three:

$\begin{matrix}{{S_{k} = {\sum\limits_{i}{g\left( {\left| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \right|,\left| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \right|,\left| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right|} \right)}}},} & (10) \\{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \middle| {}_{p}{+ K_{G}} \middle| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {}_{p}{+ K_{B}} \middle| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right|^{p} \right\}}},} & (11) \\{{S_{k} = {\sum\limits_{i}\left\{ \left| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \middle| {}_{p}{+ \left| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {}_{p}{+ \left| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right|^{p}} \right.} \right. \right\}}},} & (12) \\{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right| \right\}}},} & (13) \\{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{ki}^{\gamma} - R_{INi}^{\gamma}} \middle| {+ K_{G}} \middle| {G_{ki}^{\gamma} - G_{INi}^{\gamma}} \middle| {+ K_{B}} \middle| {B_{ki}^{\gamma} - B_{INi}^{\gamma}} \right| \right\}}},{and}} & (14) \\{S_{k} = {\sum\limits_{i}{\left\{ \left. K_{R} \middle| {R_{ki}^{2.2} - R_{INi}^{2.2}} \middle| {+ K_{G}} \middle| {G_{ki}^{2.2} - G_{INi}^{2.2}} \middle| {+ K_{B}} \middle| {B_{ki}^{2.2} - B_{INi}^{2.2}} \right| \right\}.}}} & (15)\end{matrix}$

Also with respect to the function f(x) included in expressions (10) to(13), it is preferable to use a polygonal line function or polynomialfunction which approximates a constant power of x, as the function f(x).Especially, when the gamma value of the display device is γ, it ispreferable to use a polygonal line function or polynomial function whichapproximates x̂γ as the function f(x).

The coefficients and/or constants of the function f(x) used in the RGBgrayscale data conversion circuits 33 ₁ to 33 ₃ and 34 may be specifiedby setting parameters stored in the setting registers 36. In this case,the function f(x) can be modified by modifying the setting parametersstored in the setting registers 36. For example, when the function f(x)is defined by the following expression:

f(x)=x̂γ,

a setting parameter specifying γ may be stored in the setting register36. In an alternative embodiment, when the function f(x) is defined as apolygonal line function, setting parameters specifying coefficients ofexpressions defining the respective line segments that form the graph ofthe polygonal line function may be stored in the setting registers 36.In another alternative embodiment, when the function f(x) is defined asa polynomial function of x, setting parameters specifying coefficientsof respective terms of the polynomial expression may be stored in thesetting registers 36.

The coefficients and/or constants of the function g(x, y, z) used forthe calculation of the degree of similarity S_(k) in the compressedimage data selection circuit 35 for k being an integer from one to threemay be specified by setting parameters stored in the setting register37. In this case, the function g(x, y, z) can be modified by modifyingthe setting parameters stored in the setting register 37. When thedegree of similarity S_(k) is calculated in accordance with a selectedone of expressions (11), (13), (14) and (15), for example, the settingregister 37 may store the weighting factors K_(R), K_(G) and K_(B). Inthis case, the degree of similarity S_(k) is calculated with theweighting factors K_(R), K_(G) and K_(B) stored in the setting register37.

The image compression circuit 30 thus configured can output the outputcompressed image data D_(OUT) so that the output compressed image dataD_(OUT) is generated through a suitable one of a plurality ofcompression processes (three compression processes #1 to #3 in theconfiguration illustrated in FIG. 8), more specifically, the compressionprocess which causes the least compression distortion. When the degreesof similarity S₁ to S₃ are defined as meaning to be more similar as thevalues of the degrees of similarity S₁ to S₃ are reduced, the compresseddata corresponding to one having the least value out of the degrees ofsimilarity S₁ to S₃ is selected as the output compressed image dataD_(OUT). This allows outputting the compressed data generated throughthe compression process that causes the least compression distortion asthe output compressed image data D_(OUT). In the present embodiment, inwhich the degrees of similarity S₁ to S₃ are calculated in view of theinput-output property of the display device, it is possible to outputthe compressed data generated through the compression process whichcauses the least compression distortion in the image actually displayedon the display device, as the output compressed image data D_(OUT).

The image compression circuit 30 illustrated in FIG. 8 may be used forperforming compression processing on image data in a display driverwhich drives a display panel. FIG. 9A is a block diagram illustrating anexemplary configuration of a display device 40 including a displaydriver thus configured. The display device 40 includes a display panel41 (e.g. a liquid crystal display panel and an OLED display panel) and adisplay driver 42. The display panel 41 includes a display area 41 a anda GIP (gate in panel) circuit 41 b. Disposed in the display area 41 aare pixels, gate lines and source lines. The GIP circuit 41 b drives thegate lines disposed in the display area 41 a. The display driver 42drives the source lines of the display panel 41 in response to imagedata and control data received from a processor 43 and also controls theGIP circuit 41 b.

The display driver 42 includes a command control circuit 51, an imagecompression circuit 52, an image memory 53, an image decompressioncircuit 54, a source line driver circuit 55, a grayscale voltagegenerator circuit 56, a timing control circuit 57 and setting registers58 and 59.

The command control circuit 51 forwards the image data received from theprocessor 43 to the image compression circuit 52. Furthermore, thecommand control circuit 51 controls the respective circuits of thedisplay driver 42, including the grayscale voltage generator circuit 56and the timing control circuit 57, in response to the control datareceived from the processor 43.

The image compression circuit 52 generates compressed image data byperforming compression processing on the image data received from thecommand control circuit 51 and supplies the compressed image data to theimage memory 53. In the display device 40 illustrated in FIG. 9A, theimage compression circuit 30 illustrated in FIG. 8 is used as the imagecompression circuit 52.

The image memory 53 temporarily stores the compressed image datareceived from the image compression circuit 52. The compressed imagedata is read out from the image memory 53 and supplied to the imagedecompression circuit 54.

The image decompression circuit 54 generates a decompressed image databy performing decompression processing on the compressed image data readout from the image memory 53 and supplies the decompressed image data tothe source line driver circuit 55.

The source line driver circuit 55 drives the source lines of the displayarea 41 a of the display panel 41 in response to the decompressed imagedata. In detail, the source line driver circuit 55 generates sourcevoltages having voltage levels corresponding to the decompressed imagedata by using a set of grayscale voltages received from the grayscalevoltage generator circuit 56 and drives the respective source lines withthe generated source voltages.

The grayscale voltage generator circuit 56 generates the grayscalevoltages used for the generation of the source voltages and supplies thegrayscale voltages to the source line driver circuit 55.

The timing control circuit 57 controls the operation timing of therespective circuits of the display driver 42 and the GIP circuit 41 b ofthe display panel 41.

The setting register 58 stores therein setting parameters specifying thecoefficients and/or constants of the function f(x) used in the imagecompression circuit 52. In such configuration, the function f(x) can bemodified by modifying the setting parameters stored in the settingregister 58. For example, when the function f(x) is defined by thefollowing expression:

f(x)=x̂γ,

(e.g., when the degree of similarity is calculated in the imagecompression circuit 52 in accordance with expression (8)), a settingparameter specifying the value of γ may be stored in the settingregister 58. In this case, it is preferable that γ is equal to the gammavalue of the display device 40 or the gamma value of the display panel41.

When the gamma value of the display device 40 or the gamma value of thedisplay panel 41 is γ, it is preferable to define the function f(x) as apolygonal line function or polynomial function which approximates x̂γ. Inone embodiment, when the function f(x) is defined as a polygonal linefunction, setting parameters specifying the coefficients of expressionsdefining the respective line segments that form the graph of thepolygonal line function may be stored in the setting register 58. Inanother embodiment, when the function f(x) is defined as a polynomialexpression of x, setting parameters specifying the coefficients of therespective terms of the polynomial expression may be stored in thesetting register 58.

The setting register 59 stores therein setting parameters specifyingcoefficients and/or constants included in the function g(x, y, z) usedin the image compression circuit 52. The function g(x, y, z) may bemodified by modifying the setting parameters stored in the settingregister 59. When the degree of similarity S_(k) is calculated in theimage compression circuit 52 in accordance with a selected one ofexpressions (11), (13), (14) and (15), for example, the setting register59 may store therein the weighting factors K_(R), K_(G) and K_(B). Inthis case, the degree of similarity S_(k) is calculated by using theweighting factors K_(R), K_(G) and K_(B) stored in the setting register59.

In the present embodiment, a compressed image data is generated bycompressing an image data received from the processor 43 and the imagecompression circuit 30 illustrated in the FIG. 8 is used as the imagecompression circuit 52, which supplies the compressed image data to theimage memory 53. This allows generating a compressed image datagenerated by a compression process which causes a reduced compressiondistortion in the image actually displayed on the display panel 41.

The image compression circuit 30 illustrated in FIG. 8 may be integratedin a timing controller which supplies image data to a display driver.FIG. 9B is a block diagram illustrating an exemplary configuration of adisplay device 40A including a timing controller thus configured. Thedisplay device 40A includes a display panel 41, a display driver 42A anda timing controller 44.

The timing controller 44 includes an image compression circuit 44 a, acommunication interface 44 b and setting registers 44 c and 44 d. Theimage compression circuit 44 a receives an image data associated with animage to be displayed on the display panel 41 and generates a compressedimage data by compressing the received image data. In the display device40A illustrated in FIG. 9B, the image compression circuit 30 illustratedin FIG. 8 is used as the image compression circuit 44 a. Thecommunication interface 44 b transmits the compressed image datagenerated by the image compression circuit 44 a to the display driver42A and also transmits control data controlling the operation of thedisplay driver 42A to the display driver 42A.

The setting register 44 c stores therein setting parameters specifyingthe coefficients and/or constants of the function f(x) used in the imagecompression circuit 44a. In such configuration, the function f(x) can bemodified by modifying the setting parameters stored in the settingregister 44 c. For example, when the function f(x) is defined by thefollowing expression:

f(x)=x̂γ,

(e.g., when the degree of similarity is calculated in the imagecompression circuit 44 a in accordance with expression (8)), a settingparameter specifying the value of γ may be stored in the settingregister 44 c. In this case, it is preferable that γ is equal to thegamma value of the display device 40A or the gamma value of the displaypanel 41.

When the gamma value of the display device 40A or the gamma value of thedisplay panel 41 is γ, it is preferable to define the function f(x) as apolygonal line function or polynomial function which approximates x̂γ. Inone embodiment, when the function f(x) is defined as a polygonal linefunction, setting parameters specifying the coefficients of expressionsdefining the respective line segments that form the graph of thepolygonal line function may be stored in the setting register 44 c. Inanother embodiment, when the function f(x) is defined as a polynomialexpression of x, setting parameters specifying the coefficients of therespective terms of the polynomial expression may be stored in thesetting register 44 c.

The setting register 44 d stores therein setting parameters specifyingcoefficients and/or constants included in the function g(x, y, z) usedin the image compression circuit 44 a. The function g(x, y, z) may bemodified by modifying the setting parameters stored in the settingregister 44 d. When the degree of similarity S _(k) is calculated in theimage compression circuit 44 a in accordance with a selected one ofexpressions (11), (13), (14) and (15), the setting register 44 d maystore therein the weighting factors K_(R), K_(G) and K_(B). In thiscase, the degree of similarity S_(k) is calculated by using theweighting factors K_(R), K_(G) and K_(B) stored in the setting register44 d.

The display driver 42A includes a command control circuit 51, an imagedecompression circuit 54, a source line driver circuit 55, a grayscalevoltage generator circuit 56 and a timing controller circuit 57. Theconfiguration and operation of the display driver 42A illustrated inFIG. 9B are similar to those of the display driver 42 illustrated inFIG. 9A; the difference is that the display driver 42A illustrated inFIG. 9B does not include the image compression circuit 52 and the imagememory 53. The command control circuit 51 forwards the compressed imagedata received from the timing controller 44 to the image decompressioncircuit 54. The image decompression circuit 54 generates a decompressedimage data by performing decompression processing on the compressedimage data received from the command control circuit 51 and supplies thedecompressed image data to the source line driver circuit 55.

In another application example, the above-described calculation schemeof the degree of similarity between images in the present embodiment maybe applied to a motion detection circuit which detects a motion vector.FIG. 10 is a block diagram illustrating an exemplary configuration of amotion detection circuit 60 thus configured.

The motion detection circuit 60 illustrated in FIG. 10 is configured todetect a motion vector (that is, the movement direction and movementamount) of a specific block between adjacent frame images. FIG. 11 is adiagram schematically illustrating motion vector detection in thepresent embodiment. Discussed below is the case when an image element 71included in a specific block (consisting 16×16 pixels, for example) ofthe previous frame image is moved in the current frame image asillustrated in FIG. 11. The numeral 72 in FIG. 11 indicates the positionat which the image element 71 is positioned in the previous frame image.The motion detection circuit 60 of the present embodiment calculates themotion vector of the block including the image element 71.

More specifically, as illustrated in FIG. 10, the motion detectioncircuit 60 includes movement generation blocks 61 ₁ to 61 _(N), RGBgrayscale data conversion circuit 62 ₁ to 62 _(N), 63 and a motionvector selection circuit 64. The motion generation blocks 61 ₁ to 61_(N) each receive the current frame image data (image data of thecurrent frame) and generate a block-moved image data which is an imagedata corresponding to the image in which the specific block is moved ina specific movement direction with a specific movement amount in thecurrent frame image. The motion generation blocks 61 _(k) generatesblock-moved image data #k which is an image data corresponding to theimage in which the specific block is moved in movement direction #k withspecific movement amount #k in the current frame image, for k being aninteger from one to N. FIG. 12 illustrates an example of the definitionof movement directions #1 to #N and movement amount #1 to #N. In FIG.12, movement directions #1 to #8 and movement amount #1 to #8 areillustrated.

The RGB grayscale data conversion circuits 62 ₁ to 62 _(N) areconfigured similarly to the above-described RGB grayscale dataconversion circuits 11 and 12 (see FIG. 5) and have a similar function.The RGB grayscale data conversion circuits 62 _(k) calculates valuesf(R_(ki)), f(G_(ki)) and f(B_(ki)) by respectively applying the functionf(x) to the R grayscale value R_(ki), the G grayscale value G_(ki) andthe B grayscale value B_(ki) of each pixel i of block-moved image data#k, for k being an integer from one to N.

The RGB grayscale data conversion circuits 63 is also configuredsimilarly to the above-described RGB grayscale data conversion circuits11 and 12 has a similar function. The RGB grayscale data conversioncircuits 63 calculates values f(R_(PREi)), f(G_(PREi)) and f(B_(PREi))by respectively applying the function f(x) to the R grayscale valueR_(PREi), the G grayscale value G_(PREi) and the B grayscale valueB_(PREi) of the image data of each pixel i of the previous frame image.

The motion vector selection circuit 64 calculates the degrees ofsimilarity S₁ to S_(N) between the previous frame image and the imagescorresponding to the block-moved image data #1 to #N, respectively, andselects the motion vector of the specific block on the basis ofthe,degrees of similarity S₁ to S_(N). When the image corresponding toblock-moved image data #j is most similar to the previous frame data outof the images corresponding to block-moved image data #1 to #N, themotion vector indicating movement direction #j and movement amount #1used for generating block-moved image data #j is selected. The motionvector of the specific block is thus detected.

The motion detection circuit 60 of the present embodiment, whichcalculates the degrees of similarity S₁ to S_(N) in view of theinput-output property of the display device, can detect the motionvector on the basis of the difference between images actually displayedon the display device. This effectively improves the accuracy of motionprediction.

Another embodiment of the present disclosure may be represented as adisplay device, comprising: a display panel; an image compressioncircuit generating an output compressed image data from an originalimage data; an image decompression circuit generating a decompressedimage data by decompressing the output compressed image data receivedfrom the compression circuit; a drive circuitry driving the displaypanel in response to the decompressed image data; and a first settingregister. The image compression circuit includes: a compression circuitygenerating first to N^(th) compressed data by performing first to N^(th)compression processes on the original image data, respectively, for Nbeing an integer of two or more; a decompression circuitry generatingfirst to N^(th) decompressed data by respectively performingcorresponding decompression processes on the first to N^(th) compresseddata; first to (N+1)^(th) grayscale data conversion circuits; and acompressed image data selection circuit selecting the output compressedimage data from among the first to N^(th) compressed data and outputtingthe output compressed image data. The k^(th) grayscale data conversioncircuit of the first to N^(th) grayscale data conversion circuit isconfigured to calculate values f(R_(ki)), f(G_(ki)) and f(B_(ki)) byrespectively applying a function f(x) to an R grayscale value R_(ki), aG grayscale value G_(ki) and a B grayscale value B_(ki) of each pixel iof the k^(th) decompressed data of the first to N^(th) decompresseddata, for k being any integer from one to N. The (N+1)^(th) grayscaledata conversion circuit is configured to calculate values f(R_(INi)),f(G_(INi)) and f(B_(INi)) by respectively applying the function f(x) toan R grayscale value R_(INi), a G grayscale value G_(INi) and a Bgrayscale value B_(INI) of each pixel i of the original image data. Thecompressed image data select circuit is configured to calculate degreesof similarity between the original image data and the first to N^(th)decompressed data and select an output compressed image data from thefirst to N^(th) compressed data in response to the calculated degrees ofsimilarity. The degree of similarity between the k^(th) decompresseddata and the original image data is calculated depending on|f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and |f(B_(Pi))-f(B_(Qi))|associated with each pixel i of the k^(th) decompressed data and theoriginal image data. A lower limit of a domain of definition of thefunction f(x) is the allowed minimum value of the R grayscale valuesR_(ki), R_(INi), the G grayscale values G_(ki), G_(INi) and the Bgrayscale values B_(k), B_(INi), and an upper limit of the domain ofdefinition is the allowed maximum value of the R grayscale valuesR_(ki), R_(INi), the G grayscale values G_(ki), G_(INi) and the Bgrayscale values B_(ki), B_(INi). The function f(x) is a convex functionmonotonically non-decreasing in the domain of definition. The firstsetting register stores a first setting parameter specifying acoefficient included in the function f(x).

In another embodiment, the display device further comprises a secondsetting register, wherein the degree of similarity S_(k) between thek^(th) decompressed data and the original image data is calculated inaccordance with the following expression (16):

$\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{ki} \right)} - {f\left( R_{Ini} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right| \right\}}},} & (16)\end{matrix}$

where K_(R), K_(G) and K_(B) are weighting factors defined for red,green and blue colors, respectively, in calculating the degree ofsimilarity S_(k). The second setting register stores second settingparameters specifying the weighting factors K_(R), K_(G) and K_(B).

In another embodiment of the display device, the degree of similarityS_(k) between the k^(th) decompressed data and the original image datais calculated in accordance with the following expression (17):

$\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{Pi}^{\gamma} - R_{Qi}^{\gamma}} \middle| {+ K_{G}} \middle| {G_{Pi}^{\gamma} - G_{Qi}^{\gamma}} \middle| {+ K_{B}} \middle| {B_{Pi}^{\gamma} - B_{Qi}^{\gamma}} \right| \right\}}},} & (17)\end{matrix}$

where K_(R), K_(G) and K_(B) are weighting factors defined for red,green and blue colors, respectively, in calculating the degree ofsimilarity S_(k), where γ is equal to a gamma value of the display panelor the display device.

Another embodiment of the present disclosure may be represented as animage processing method, comprising calculating values f(R_(Pi)),f(G_(Pi)) and f(B_(Pi)) by applying a function f(x) to an R grayscalevalue R_(Pi), a G grayscale value G_(Pi) and a B grayscale value B_(Pi)of each pixel i of a first image; calculating values f(R_(Qi)),f(G_(Qi)) and f(B_(Qi)) by applying the function f(x) to an R grayscalevalue R_(Qi), a G grayscale value G_(Qi) and a B grayscale value B_(Qi)of each pixel i of a second image; and calculating a degree ofsimilarity between the first and second images depending on|f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and if(B_(Pi))-f(B_(Qi))|associated with each pixel i of the first and second images. A lowerlimit of a domain of definition of the function f(x) is the allowedminimum value of the R grayscale values R_(Pi), R_(Qi), the G grayscalevalues G_(Pi), G_(Qi) and the B grayscale values B_(Pi), B_(Qi), and anupper limit of the domain of definition is the allowed maximum value ofthe R grayscale values R_(Pi), R_(Qi), the G grayscale values G_(Pi),G_(Qi) and the B grayscale values B_(Pi), B_(Qi). The function f(x) is aconvex function monotonically non-decreasing in the domain ofdefinition.

Another embodiment of the present disclosure may be represented as anon-transitory recording medium recording a program which when executedcauses a computer to implement steps of: calculating values f(R_(Pi)),f(G_(Pi)) and f(B_(Pi)) by applying a function f(x) to an R grayscalevalue R_(Pi), a G grayscale value G_(Pi) and a B grayscale value B_(Pi)of each pixel i of a first image; calculating values f(R_(Qi)),f(G_(Qi)) and f(B_(Qi)) by applying the function f(x) to an R grayscalevalue R_(Qi), a G grayscale value G_(Qi) and a B grayscale value B_(Qi)of each pixel i of a second image; and calculating a degree ofsimilarity between the first and second images depending on|f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and |f(B_(Pi))-f(B_(Qi))|associated with each pixel i of the first and second images. A lowerlimit of a domain of definition of the function f(x) is the allowedminimum value of the R grayscale values R_(Pi), R_(Qi), the G grayscalevalues G_(Pi), G_(Qi) and the B grayscale values B_(Pi), B_(Qi), and anupper limit of the domain of definition is the allowed maximum value ofthe R grayscale values R_(Pi), R_(Qi), the G grayscale values G_(Pi),G_(Qi) and the B grayscale values B_(Pi), B_(Qi). Tthe function f(x) isa convex function monotonically non-decreasing in the domain ofdefinition.

Although various embodiments of the present disclosure have beenspecifically described in the above, the present disclosure must not beconstrued as being limited to the above-described embodiments. It wouldbe apparent to a person skilled in the art that the present disclosuremay be implemented with various modifications.

What is claimed is:
 1. An image processing apparatus, comprising: afirst circuit which calculates values f(R_(Pi)), f(G_(Pi)) and f(B_(Pi))by applying a function f(x) to an R grayscale value R_(Pi), a Ggrayscale value G_(Pi) and a B grayscale value B_(Pi) of each pixel i ofa first image; a second circuit which calculates values f(R_(Qi)),f(G_(Qi)) and f(B_(Qi)) by applying the function f(x) to an R grayscalevalue R_(Qi), a G grayscale value G_(Qi) and a B grayscale value B_(Qi)of each pixel i of a second image; and a similarity calculation circuitwhich calculates a degree of similarity between the first and secondimages depending on |f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and|f(B_(Pi))-f(B_(Qi))| of each pixel i of the first and second images,wherein a lower limit of a domain of definition of the function f(x) isthe allowed minimum value of the R grayscale values R_(Pi), R_(Qi), theG grayscale values G_(Pi), G_(Qi) and the B grayscale values B_(Pi),B_(Qi), and an upper limit of the domain of definition is the allowedmaximum value of the R grayscale values R_(Pi), R_(Qi), the G grayscalevalues G_(Pi), G_(Qi) and the B grayscale values B_(Pi), B_(Qi), andwherein the function f(x) is a convex function monotonicallynon-decreasing in the domain of definition.
 2. The image processingapparatus according to claim 1, wherein the degree of similarity betweenthe first and second images is calculated in accordance with thefollowing expression (1): $\begin{matrix}{{S = {\sum\limits_{i}{g\left( {\left| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \right|,\left| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \right|,\left| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right|} \right)}}},} & (1)\end{matrix}$ where Σ represents a sum with respect to all pixels of thefirst and second images and g(x, y, z) is a function which is not aconstant function.
 3. The image processing apparatus according to claim1, wherein the degree of similarity between the first and second imagesis calculated in accordance with the following expression (2):$\begin{matrix}{{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {}_{p}{+ K_{G}} \middle| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {}_{p}{+ K_{B}} \middle| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right|^{p} \right\}}},} & (2)\end{matrix}$ wherein p is a non-zero number and K_(R), K_(G) and K_(B)are weighting factors defined for red, green and blue colors,respectively, in calculating the degree of similarity S.
 4. The imageprocessing apparatus according to claim 1, wherein the degree ofsimilarity between the first and second images is calculated inaccordance with the following expression (3): $\begin{matrix}{{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right| \right\}}},} & (3)\end{matrix}$ wherein K_(R), K_(G) and K_(B) are weighting factorsdefined for red, green and blue colors, respectively, in calculating thedegree of similarity S.
 5. The image processing apparatus according toclaim 1, wherein the degree of similarity between the first and secondimages is calculated in accordance with the following expression (4):$\begin{matrix}{{S = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{Pi} \right)} - {f\left( R_{Qi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{Pi} \right)} - {f\left( G_{Qi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{Pi} \right)} - {f\left( B_{Qi} \right)}} \right| \right\}}},} & (3)\end{matrix}$ wherein K_(R), K_(G) and K_(B) are weighting factorsdefined for red, green and blue colors, respectively, in calculating thedegree of similarity S and γ is a predetermined constant.
 6. The imageprocessing apparatus according to claim 1, wherein the function f(x) isdefined as a polygonal line function which approximates x̂γ, where γ is apredetermined constant.
 7. The image processing apparatus according toclaim 1, wherein the function f(x) is defined as a polynomial functionwhich approximates x̂γ, where γ is a predetermined constant.
 8. The imageprocessing apparatus according to claim 6, wherein γ is equal to a gammavalue of a display device in which image data of the first and secondimages.
 9. The image processing apparatus according to claim 4, whereinthe weighting factors K_(R), K_(G) and K_(B) are determined based on acolor gamut of a display panel included in a display device in whichimage data of the first and second images are used.
 10. The imageprocessing apparatus according to claim 1, further comprising: a firstsetting register storing a first setting parameter specifying acoefficient included in the function f(x).
 11. The image processingapparatus according to claim 2, further comprising: a second settingregister storing a second setting parameter specifying a coefficientincluded in the function g(x, y, z).
 12. The image processing apparatusaccording to claim 4, further comprising: a second setting registerstoring second setting parameters specifying the weighting factorsK_(R), K_(G) and K_(B).
 13. An image compression circuit, comprising: acompression circuity generating first to N^(th) compressed data byperforming first to N^(th) compression processes on an original imagedata, respectively, for N being an integer of two or more; adecompression circuitry generating first to N^(th) decompressed data byrespectively performing corresponding decompression processes on thefirst to N^(th) compressed data; first to (N+1)^(th) grayscale dataconversion circuits; and a compressed image data selection circuitselecting an output compressed image data from among the first to N^(th)compressed data and outputting the output compressed image data, whereinthe k^(th) grayscale data conversion circuit of the first to N^(th)grayscale data conversion circuit is configured to calculate valuesf(R_(ki)), f(G_(ki)) and f(B_(ki)) by respectively applying a functionf(x) to an R grayscale value R_(ki), a G grayscale value G_(ki) and a Bgrayscale value B_(ki) of each pixel i of the k^(th) decompressed dataof the first to N^(th) decompressed data, for k being any integer fromone to N, wherein the (N+1)^(th) grayscale data conversion circuit isconfigured to calculate values f(R_(INi)), f(G_(INi)) and f(B_(INi)) byrespectively applying the function f(x) to an R grayscale value R_(INi),a G grayscale value G_(INi) and a B grayscale value B_(INi) of eachpixel i of the original image data, wherein the compressed image dataselect circuit is configured to calculate degrees of similarity betweenthe original image data and the first to N^(th) decompressed data andselect an output compressed image data from the first to N^(th)compressed data in response to the calculated degrees of similarity,wherein the degree of similarity between the k^(th) decompressed dataand the original image data is calculated depending on|f(R_(ki))-f(R_(INi))|, |f(G_(ki))-f(G_(INi))| and|f(B_(ki))-f(B_(INi))| associated with each pixel i of the k^(th)decompressed data and the original image data, wherein a lower limit ofa domain of definition of the function f(x) is the allowed minimum valueof the R grayscale values R_(ki), R_(INi), the G grayscale valuesG_(ki), G_(INi) and the B grayscale values B_(ki), B_(INi), and an upperlimit of the domain of definition is the allowed maximum value of the Rgrayscale values R_(ki), R_(INi), the G grayscale values G_(ki), G_(INi)and the B grayscale values B_(ki), B_(INi), wherein the function f(x) isa convex function monotonically non-decreasing in the domain ofdefinition.
 14. The compression circuit according to claim 13, whereinthe degree of similarity S_(k) between the k^(th) decompressed data andthe original image data is calculated in accordance with the followingexpression (5): $\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right| \right\}}},} & (5)\end{matrix}$ where K_(R), K_(G) and K₆ are weighting factors definedfor red, green and blue colors, respectively, in calculating the degreeof similarity S_(k).
 15. The compression circuit according to claim 13,wherein the degree of similarity S_(k) between the k^(th) decompresseddata and the original image data is calculated in accordance with thefollowing expression (6): $\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{ki}^{\gamma} - R_{INi}^{\gamma}} \middle| {+ K_{G}} \middle| {G_{ki}^{\gamma} - G_{INi}^{\gamma}} \middle| {+ K_{B}} \middle| {B_{ki}^{\gamma} - B_{INi}^{\gamma}} \right| \right\}}},} & (6)\end{matrix}$ where K_(R), K_(G) and K₆ are weighting factors definedfor red, green and blue colors, respectively, in calculating the degreeof similarity S_(k) and γ is a predetermined constant.
 16. Thecompression circuit according to claim 13, wherein the function f(x) isdefined as a polygonal line function which approximates x̂γ, where γ is apredetermined constant.
 17. A display driver for driving a displaypanel, comprising: an image compression circuit generating an outputcompressed image data from an original image data; an image memorystoring the output compressed image data received from the compressioncircuit; an image decompression circuit generating an decompressed imagedata by decompressing the output compressed image data received from theimage memory; and a drive circuitry driving the display panel inresponse to the decompressed image data, wherein the image compressioncircuit includes: a compression circuity generating first to N^(th)compressed data by performing first to N^(th) compression processes onthe original image data, respectively, for N being an integer of two ormore; a decompression circuitry generating first to N^(th) decompresseddata by respectively performing corresponding decompression processes onthe first to N^(th) compressed data; first to (N+1)^(th) grayscale dataconversion circuits; and a compressed image data selection circuitselecting the output compressed image data from among the first toN^(th) compressed data and outputting the output compressed image data,wherein the k^(th) grayscale data conversion circuit of the first toN^(th) grayscale data conversion circuit is configured to calculatevalues f(R_(ki)), f(G_(ki)) and f(B_(ki)) by respectively applying afunction f(x) to an R grayscale value R_(ki), a G grayscale value G_(ki)and a B grayscale value B_(ki) of each pixel i of the k^(th)decompressed data of the first to N^(th) decompressed data, for k beingany integer from one to N, wherein the (N+1)^(th) grayscale dataconversion circuit is configured to calculate values f(R_(INi)),f(G_(INi)) and f(B_(INi)) by respectively applying the function f(x) toan R grayscale value R_(INi), a G grayscale value G_(INi) and a Bgrayscale value B_(INi) of each pixel i of the original image data,wherein the compressed image data select circuit is configured tocalculate degrees of similarity between the original image data and thefirst to N^(th) decompressed data and select an output compressed imagedata from the first to N^(th) compressed data in response to thecalculated degrees of similarity, wherein the degree of similaritybetween the k^(th) decompressed data and the original image data iscalculated depending on |f(R_(Pi))-f(R_(Qi))|, |f(G_(Pi))-f(G_(Qi))| and|f(B_(Pi))-f(B_(Qi))| associated with each pixel i of the k^(th)decompressed data and the original image data, wherein a lower limit ofa domain of definition of the function f(x) is the allowed minimum valueof the R grayscale values R_(ki), R_(INi), the G grayscale valuesG_(ki), G_(INi), and the B grayscale values B_(ki), B_(INi), and anupper limit of the domain of definition is the allowed maximum value ofthe R grayscale values R_(ki), R_(INi), the G grayscale values G_(ki),G_(INi) and the B grayscale values B_(ki), B_(INi), wherein the functionf(x) is a convex function monotonically non-decreasing in the domain ofdefinition.
 18. The display driver according to claim 17, furthercomprising: a first setting register storing a first setting parameterspecifying a coefficient included in the function f(x).
 19. The displaydriver according to claim 17, further comprising a second settingregister, wherein the degree of similarity S_(k) between the k^(th)decompressed image data and the original image data is calculated inaccordance with the following expression (7): $\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {{f\left( R_{ki} \right)} - {f\left( R_{INi} \right)}} \middle| {+ K_{G}} \middle| {{f\left( G_{ki} \right)} - {f\left( G_{INi} \right)}} \middle| {+ K_{B}} \middle| {{f\left( B_{ki} \right)} - {f\left( B_{INi} \right)}} \right| \right\}}},} & (7)\end{matrix}$ where K_(R), K_(G) and K_(B) are weighting factors definedfor red, green and blue colors, respectively, in calculating the degreeof similarity S_(k), and wherein the second setting register storessecond setting parameters specifying the weighting factors K_(R), K_(G)and K_(B).
 20. The display driver according to claim 17, wherein thedegree of similarity S_(k) between the k^(th) decompressed image dataand the original image data is calculated in accordance with thefollowing expression (8): $\begin{matrix}{{S_{k} = {\sum\limits_{i}\left\{ \left. K_{R} \middle| {R_{Pi}^{\gamma} - R_{Qi}^{\gamma}} \middle| {+ K_{G}} \middle| {G_{Pi}^{\gamma} - G_{Qi}^{\gamma}} \middle| {+ K_{B}} \middle| {B_{Pi}^{\gamma} - B_{Qi}^{\gamma}} \right| \right\}}},} & (8)\end{matrix}$ where K_(R), K_(G) and K_(B) are weighting factors definedfor red, green and blue colors, respectively, in calculating the degreeof similarity S_(k), wherein γ is equal to a gamma value of the displaypanel.